<template>
	<view class="page-doc">
		<mx-navbar :isClearFixed="true" :title="title" />
		
		<view class="content">
			<mp-html :content="content" />
		</view>
	</view>
</template>

<script setup>
	import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue'
	const {proxy} = getCurrentInstance()
	const data = reactive({
		key: '',
		title: '',
		content: ''
	})
	const {title,content} = toRefs(data)
	onLoad((options) => {
		data.key = options.key
		getData()
	})

	async function getData() {
		let res = await proxy.$api('ConfigDesc',{
			key: data.key
		})
		if(res.code === 0) {
			data.content = res.data.content || ''
			data.title = res.data.name || '悟空商城'
		}
	}
</script>

<style scoped lang="scss">
	.page-doc{
		width: 100%;
		min-height: 100vh;
		background-color: #ffffff;
		.content{
			padding: 30rpx;
			font-size: 26rpx;
			line-height: 1.6;
			color: #000;
		}
	}    
</style>
